﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SES.CMS.BL;

namespace SES.CMS.Module
{
    public partial class ucSlideNewProduct : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                rptNewestProductDataSource();
        }

        private void rptNewestProductDataSource()
        {
            rptNewestProduct.DataSource = new cmsSanPhamBL().NewestProduct();
            rptNewestProduct.DataBind();
        }
        public string FriendlyUrl(string s)
        {
            return Ultility.Change_AV(s);
        }
        public string WordCut(string text)
        {
            return Ultility.WordCut(text, 50, new char[] { ' ', '.', ',', ';' }) + "...";
        }
    }
}